const long knownResistor = 1500;  // Constant value of known resistor in Ohms

const int buttonPin = 2;
const int ledPin = 12;

const int enableWateringPin = 8;  //***** COMMENT IN ENABLE_LCD MODE
const int disableWateringPin = 9;  //***** COMMENT IN ENABLE_LCD MODE

const int analogPin0 = A0;  //First input for voltage reading
const int analogPin1 = A1;  //Second input for voltage reading
const int digitalPin1 = 6;  //Suply alternative voltage by digital output for Kirchoff loop
const int digitalPin2 = 7;  //Suply alternative voltage by digital output for Kirchoff loop

//**** min 8 *** doit etre un multiple de wdtSleepTime, sinon sera arrondi au prochain multiple supérieur.
const int secondsWaitTime = 8;  //**min 8
const int relayOnTime = 20;
const long startupMenuActiveTime = 5000;
const long startupMenuBlinkInterval = 1000;
const int humidityPercentageAmplitude = 2; //Ex pour treshold = 45, amplitude = 5 : activer_arrosage = humidite_lue <= (45 - 5), desactiver_arrosage = humidite_lue >= (45 + 5).
int medianHumidityPercentageTreshold = 50; //la valeur dont on ajoutera ou soustraira humidityPercentageToleranceAmplitude pour comparer avec l'humidite lue.


#define DEBUG //enclosing each writeDebug statement in a #ifdef DEBUG .. #endif helps reduce the space of the generated binary.

//#define EMULATE_READINGS //Uncomment this to provide emulated values instead of reading them from the sensor.

//#define ENABLE_LCD //Uncomment this to display readings on the LCD screen.  Make sure your pin numbers are good before you do.

#define ENABLE_WATERING  //Uncomment to enable watering mode 

#define ENABLE_LOW_POWER //Uncomment this to go in idle mode between readings (uses less electricity) instead of calling delay. 

#define NUM_READS 11    // Number of sensor reads for filtering

